<?php
/**
* This is a custom class for helloworld kit
* @link http://webappkit.net
* @package helloworld
* @author J.Ducastel <jeremie@ducastel.name>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/

class helloKitty extends webappkit {
	
	/**
	 *@var string
	 */
	var $msg = "meeow";
	
	/**
	 * @var array files to display path => content
	 */
	var $files=array();
	
	/**
	 * custom kit function
	 */
	function run() {
		// setting language
		$lang=isset($_GET['lang'])?$_GET['lang']:'en';
		$this->templates->setCriteria('lang',$lang);
		// getting template
		$tpl=$this->templates->getItem('home');
		// reading used files
		$files=array('index.php'
			//,'webappkit/include-me.php'
			,'webappkit/helloworld.wak/wak.ini'
			,'webappkit/helloworld.wak/hellokitty.class.php4');
		$this->readFiles($files);
		$this->counter=webappkit::timecounter();
		echo $tpl->render($this);
	}
	
	function readFiles($pathes) {
		foreach ($pathes as $path) {
			$this->files[]=array('path'=>$path
				,'content'=>join('',file($path)));
		}
	}
}
?>